package com.jzo2o.customer.controller.agency;

import com.jzo2o.customer.model.dto.request.AgencyCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.response.RejectReasonResDTO;
import com.jzo2o.customer.service.IAgencyCertificationAuditService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 机构端 - 机构认证相关接口
 * @Author: szc
 * @Date: 2025/09/17 16:09
 * @Description:
 */
@RestController
@RequestMapping("/agency/agency-certification-audit")
@ApiOperation("机构端 - 机构认证相关接口")
public class AgencyCertificationAuditController {

    @Resource
    private IAgencyCertificationAuditService iAgencyCertificationAuditService;

    @PostMapping
    @ApiOperation("机构端提交认证")
    public void certification(@RequestBody AgencyCertificationAuditAddReqDTO agencyCertificationAuditAddReqDTO) {
        iAgencyCertificationAuditService.certification(agencyCertificationAuditAddReqDTO);
    }

    @GetMapping("/rejectReason")
    @ApiOperation("查询最新驳回原因")
    public RejectReasonResDTO getRejectReason() {
        return iAgencyCertificationAuditService.getRejectReason();
    }
}
